package com.xinqi.modules.course.textbook.manager;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinqi.common.mybatis.data.service.BaseService;
import com.xinqi.modules.course.textbook.dto.req.CourseCloudTextbookContentQueryDTO;
import com.xinqi.modules.course.textbook.dto.rsp.CourseCloudTextbookContentResultDTO;
import com.xinqi.modules.course.textbook.domain.CourseCloudTextbookContentEntity;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 课程模块云课本课堂内容管理层
 *
 * @author: wenjie
 * @date: 2023/05/30
 */
public interface CourseCloudTextbookContentManager extends BaseService<CourseCloudTextbookContentEntity> {

    /**
     * 自定义分页查询
     */
    Page<CourseCloudTextbookContentResultDTO> findPage(Page<Object> page, CourseCloudTextbookContentQueryDTO query);

    /**
     * 自定义列表查询
     */
    List<CourseCloudTextbookContentResultDTO> findList(CourseCloudTextbookContentQueryDTO query);

    /**
     * 根据id查询 课程模块云课本课堂内容数据
     */
    CourseCloudTextbookContentEntity findById(Long id);

    /**
     * 根据id删除 课程模块云课本课堂内容数据
     */
    @Transactional(rollbackFor = Exception.class)
    boolean deleteById(Long id);
}
